snippet min_template "minimal driver template"
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>

static int __init init_${1:my_module}(void)
{
    printk(KERN_INFO "Hello, my module!\n");
    return 0;
}

static void __exit exit_$1(void)
{
    printk(KERN_INFO "Bye, my module!\n");
}

module_init(init_$1);
module_exit(exit_$1);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("wangjun");

/* Makefile
obj-m += $1.o
all:
	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
*/
endsnippet



